﻿using System;
using System.ComponentModel;

namespace CRMCommon
{
    [Serializable]
    public class CustomEventList : BindingList<CustomEvent>
    {
        public void AddRange(CustomEventList events)
        {
            foreach (var customEvent in events)
                Add(customEvent);
        }
        public int GetEventIndex(object eventId)
        {
            for (var eventIndex = 0; eventIndex < Count; eventIndex++)
                if (this[eventIndex].Id == eventId)
                    return eventIndex;
            return -1;
        }
    }
}
